package com.teamblueplus.websearch;

import com.teamblueplus.R;

import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.util.Log;
import android.widget.ImageView;
import android.widget.TextView;

public class ImageViewer extends Activity {


	private TextView imageTextView;
	private ImageView mImageView;
	private Uri mImageCaptureUri;
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		
		super.onCreate(savedInstanceState);
		String path= Environment.getExternalStorageDirectory().toString() + "/dimages/";
		path += getIntent().getStringExtra("imagepath");
		
		Log.d("$$$$$$$$$$$", Environment.getExternalStorageDirectory().toString());
		setContentView(R.layout.image_viewer);
		mImageView = (ImageView) findViewById(R.id.imageview);
		
		TextView tv = (TextView) this.findViewById(R.id.imagetv);
		
		tv.setText("Web Search Viewer");
		Bitmap bitmap 	= null;
		
		
//		
//		if (path == null)
//			path = mImageCaptureUri.getPath(); //from File Manager
		
		if (path != null) 
			bitmap 	= BitmapFactory.decodeFile(path);
		
		mImageView.setImageBitmap(bitmap);
	}

}
